<%= form_for(@tutorial) do |f| %>
  <% if @tutorial.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@tutorial.errors.count, "error") %> prohibited this tutorial from being saved:</h2>

      <ul>
      <% @tutorial.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :name, "Naslov" %><br />
    <%= f.text_field :name, :class => [:big,:title] %>
  </div>
  <div class="field">
    <%= f.label :slug, "URL naslov (slug)" %><br />
    <%= f.text_field :slug, :class => [:big,:slug] %>
  </div>
  
   <div class="field">
    <%= f.label :tutorial_category_id, "Kategorija" %><br />
    <%= collection_select( :tutorial, :tutorial_category_id, @tutorial_categories, :id, :name)%>
  </div>
  
  <div class="field">
    <%= f.label :description, "Opis" %><br />
    <%= f.text_area :description %>
  </div>
  
  <div class="field">
    <%= f.label :content, "Sadržaj" %><br />
    <%= f.text_area :content, :class => [:big, "bb-code"] %>
  </div>
  
  <div class="actions">
    <%= f.submit "Spremi" %>
  </div>
<% end %>
